var t = require("../../../../@babel/runtime/helpers/typeof"), e = getApp();

Page({
    data: {
        integral: "",
        recordsList: [],
        isLoadMore: !0,
        page: 1,
        total_page: 0
    },
    onLoad: function(t) {
        var e = this;
        wx.getStorage({
            key: "integral",
            success: function(t) {
                console.log(t.data), "" != t.data && (e.setData({
                    integral: t.data
                }), wx.setNavigationBarTitle({
                    title: e.data.integral ? e.data.integral + "活动奖励" : "积分活动奖励"
                }));
            }
        }), this.checkrouter(), this.getData();
    },
    checkrouter: function() {
        try {
            var e = function() {
                for (var t = wx.getStorageSync("yz_basic_info"), e = t.popularize_page.mini.vue_route, a = 0; a < e.length; a++) if ("point_activity_award_center" == e[a]) return console.log(t.popularize_page.mini.mini_url + "跳转的路径"), 
                wx.showToast({
                    title: "未开启推广权限",
                    duration: 1e3,
                    icon: "none",
                    success: function() {
                        setTimeout(function() {
                            wx.redirectTo({
                                url: t.popularize_page.mini.mini_url
                            });
                        }, 1e3);
                    }
                }), {
                    v: void 0
                };
            }();
            if ("object" === t(e)) return e.v;
        } catch (t) {
            console.log(t);
        }
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getData: function() {
        var t = this, a = e.getNetAddresss("plugin.point-activity.Frontend.Modules.Activity.Controllers.point-activity-award-log.get-point-activity-award-log");
        a += "&member_id=" + this.options.num, e._getNetWork({
            url: a,
            success: function(e) {
                var a = e.data;
                1 === a.result ? (t.setData({
                    recordsList: a.data.list.data,
                    isLoadMore: !0,
                    total_page: a.data.list.last_page
                }), t.data.total_page || t.setData({
                    total_page: 0
                })) : wx.showToast({
                    title: a.msg,
                    icon: "none"
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    }
});